﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using fbasync.webcomponents;

namespace fbasync.web
{
    public partial class _Default : FacebookPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            uid.Text = Connection.UserId.Value.ToString();
            isAppUser.Checked = Connection.EndIsAppUser(Connection.BeginIsAppUser(null, null));
        }

        protected void OnGoCheckIsAppUser(object sender, EventArgs e)
        {
            // we use templated connection here to check if it works properly for this method.
            var cnn = new FacebookConnection();
            isAppUserR.Visible = true;
            isAppUserR.Checked = cnn.EndIsAppUser(cnn.BeginIsAppUser(long.Parse(fbid.Text), null, null));
        }
    }
}
